#!/usr/bin/env python
# -*- coding:utf-8 -*-

# file:3_print_odd_numbers.py
# author:张世航
# datetime:2024/10/31 19:23
# software: PyCharm
"""
this is function  description 
"""
# import module your need

# 3  编写一个函数, 传入一个数字列表, 输出列表中的奇数;
#    数字列表请用随机数函数生成;

import random

def print_odd_numbers():
    numbers = [random.randint(1, 100) for _ in range(20)]  # 生成20个随机数
    odd_numbers = [num for num in numbers if num % 2 != 0]
    print("生成的随机数:", numbers)
    print("列表中的奇数:", odd_numbers)

print_odd_numbers()